package com.yanqu.road.logic.pb;

import com.yanqu.road.entity.activity.tonbingchannel.data.ChannelTonBingPatrons;
import com.yanqu.road.pb.activity.ChannelTonBingProto;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class ChannelTonBingPb {

    public static Map<Integer, ChannelTonBingPatrons> parseChannelTonBingPatrons(List<ChannelTonBingProto.CTonBingPatronsTempMsg> msgList) {
        Map<Integer, ChannelTonBingPatrons> patronsMap = new ConcurrentHashMap<>();
        for (ChannelTonBingProto.CTonBingPatronsTempMsg msg : msgList) {
            patronsMap.put(msg.getId(), new ChannelTonBingPatrons(msg.getId(), msg.getSkin(), msg.getAbility(),msg.getOccId()));
        }
        return patronsMap;
    }

}
